define(function(){
    return function(cb){
        const xhr = new XMLHttpRequest();
        xhr.open("get"," http://localhost:3000/api1?type=goods");
        xhr.onreadystatechange = function(){
            if(xhr.readyState == 4 && xhr.status == 200){
                cb(JSON.parse(xhr.responseText));
            }
        }
        xhr.send();
    }
})